{* Smarty *}


<!-- ------------------ CONTENT ------- -->

<script language="javascript" type="text/javascript" src="../js/location.js"></script>
<script language="javascript" type="text/javascript" src="../js/datetimepicker.js"></script>
<script language="javascript" type="text/javascript" src="../js/checkout_admin.js"></script>


<p><b class="title">Client Edit Form</b></p>
    <br />

<!-- ****************************************************  Start of Form ******************************************************* -->

<form name="form_check_out" method="post" action="{geturl plugin=clientsclass method='null'}{$str_get}" onSubmit = "javascript : return  checkForm('form_check_out');">
<input type="hidden" name="event" value="EditClient" />
<input type="hidden" name="client_id" value="{$info_client.client_id}" />



<!-- ************************* Cart Table ************************************************************************************** -->

                <table width="70%" cellpadding="1" cellspacing="1" border="0" id="content_text">
                <tr class="subtitle">
                    <td colspan="4">Client Account information</td>
                </tr>
                <tr class="light">
                    <td align="right" width="20%">Name:<sup><font color=red>*</font></sup>&nbsp;</td>
                    <td><input type="text" name="client_name" value="{$info_client.client_name}" class='inputtext' style="width:95%"></td>
                </tr>
                <tr class="light">
                    <td align="right" width="20%">Email(login):<sup><font color=red>*</font></sup>&nbsp;</td>
                    <td>
                        <input type="text" name="client_email" value="{$info_client.client_email}" class='inputtext' style="width:95%">
                    {if "" != $error_email}
                        <br />
                        <font color="red">{$error_email}</font>
                    {/if}
                    </td>
                </tr>
                <tr class="light">
                    <td align="right" width="20%">Old password:<sup><font color=red></font></sup>&nbsp;</td>
                    <td>
                        <input type="password" name="old_client_password" value="" class='inputtext' style="width:95%">
                    {if "" != $error_password}
                        <br />
                        <font color="red">{$error_password}</font>
                    {/if}
                    </td>
                </tr>
                <tr class="light">
                    <td align="right" width="20%">New password:<sup><font color=red></font></sup>&nbsp;</td>
                    <td><input type="password" name="client_password" value="" class='inputtext' style="width:95%"></td>
                </tr>
                <tr class="light">
                    <td align="right" width="20%">Re-enter password:<sup><font color=red></font></sup>&nbsp;</td>
                    <td><input type="password" name="re_client_password" value="" class='inputtext' style="width:95%"></td>
                </tr>

                <tr class="light">
                    <td align="right" width="20%">Phone:<sup><font color=red></font></sup>&nbsp;</td>
                    <td><input type="text" name="client_phone" value="{$info_client.client_phone}" class='inputtext' style="width:95%"></td>
                </tr>
                <tr class="light">
                    <td align="right" width="20%" valign="top">Mail groups:<sup><font color=red></font></sup>&nbsp;</td>
                    <td>
                        <select name="mail_groups[]" class='inputtext' style="width:50%;" size=10 multiple>
                        {foreach from = $list_mail_groups    item = group}
                            <option value="{$group.group_id}"{if in_array($group.group_id, $info_client.mail_groups)} selected{/if}>{$group.name}</option>
                        {/foreach}
                        </select>
                        <font color="red">(You can select several groups)</font>
                    </td>
                </tr>
                <tr class="light">
                    <td align="right" width="20%" valign="top">Last visit products:<sup><font color=red></font></sup>&nbsp;</td>
                    <td>
                    {foreach  from = $list_history_products  item = product}
                        <li /> <a href="{geturl plugin=productlist method='null' params='page=edit'}&parent_id={$product.prod_info.parent_id}&catalog_id={$product.prod_info.catalog_id}&id={$product.prod_info.catalog_id}">{$product.prod_info.title}</a>
                    {/foreach}
                    </td>
                </tr>
                <tr class="light">
                    <td align="right" width="20%">Birthday:<sup><font color=red></font></sup>&nbsp;</td>
                    <td><input type="text" id="BirthDate" name="client_birthday" value="{$info_client.client_birthday|date_format:"%m/%d/%Y"}" maxlength="25" size="25" style="width:115px;" />
                        <a href="javascript:NewCal('BirthDate','ddmmmyyyy',false,24)"><img src="/img/cal.gif" width="16" height="16" border="0" alt="Pick a date"></a>
                    </td>
                </tr>
                <tr class="dark">
                    <td colspan="2" style="padding-left:30px;margin-left:30px;">
                        <font color="Red"><sup>*</sup> - fields required</font>
                        <br />
                    </td>
                </tr>
                <tr>
                    <td align="center" colspan="2">
                        <input type="submit" value="Apply" class="button" />
                        &nbsp;&nbsp;&nbsp;
                        <input type="button" value="Cancel" class="button" onClick="javascript : window.location.href = '{geturl plugin=clientsclass method='null'}{$str_get}'" />
                        <br />
                    </td>
                </tr>
                </table>
                
    <br />
    <br />
    <br />
    <br />
	
	<!-- *************************Balance ************************************************************************************** -->

	<table width="70%" cellpadding="1" cellspacing="1" border="0" id="content_text">
                <tr class="subtitle">
                    <td colspan="4">Client Balance</td>
                </tr>
                <tr class="light">
                    <td align="right" width="20%">Balance:&nbsp;</td>
                    <td><input type="text" name="client_name" value="{$info_client.balance}" class='inputtext' style="width:100;" readonly ></td>
                </tr>
                </table>
    <br />
    <br />
    <br />
    <br />

<!-- ************************* Billing information **************************************** -->

                <table width="70%" cellpadding="1" cellspacing="1" border="0" id="content_text">
                <tr class="subtitle">
                    <td colspan="4">Billing information</td>
                </tr>
                <tr class="light">
                    <td align="right" width="20%">Name:<sup><font color=red>*</font></sup>&nbsp;</td>
                    <td><input type="text" name="client_billing_name" value="{$info_client.client_billing_name}" class='inputtext' style="width:95%"></td>
                </tr>
                <tr class="light">
                    <td align="right">Country:&nbsp;</td>
                    <td><SELECT id="client_billing_country" style="width:95%" OnChange="FillState(document.form_check_out.client_billing_country, document.form_check_out.client_billing_state,'')"  name="client_billing_country" class="inputtext"></SELECT></td>
                </tr>
                <tr class="light">
                    <td align="right">Address1:<sup><font color=red>*</font></sup>&nbsp;</td>
                    <td><input type="text" name="client_billing_adress1" value="{$info_client.client_billing_adress1}" class='inputtext' style='width: 95%'></td>
                </tr>
                <tr class="light">
                    <td align="right">Address2:&nbsp;</td>
                    <td><input type="text" name="client_billing_adress2" value="{$info_client.client_billing_adress2}" class='inputtext' style='width: 95%'></td>
                </tr>
                <tr class="light">
                    <td align="right">City:<sup><font color=red>*</font></sup>&nbsp;</td>
                    <td><input type="text" name="client_billing_city" value="{$info_client.client_billing_city}" class='inputtext' style='width: 95%'></td>
                </tr>
                <tr class="light">
                    <td align="right">State:&nbsp;</td>
                    <td><SELECT id="state" style="width:95%" size=1 name="client_billing_state" value="Alabama" class="inputtext"></SELECT></td>
                </tr>
                <tr class="light">
                    <td align="right">Zip:<sup><font color=red>*</font></sup>&nbsp;</td>
                    <td><input type="text" name="client_billing_zip" value="{$info_client.client_billing_zip}" class='inputtext' style='width: 95%'></td>
                </tr>
                <tr class="light">
                    <td align="right">Phone number:<sup><font color=red>*</font></sup>&nbsp;</td>
                    <td><input type="text" name="client_billing_phone" value="{$info_client.client_billing_phone}" class='inputtext' style='width: 95%'></td>
                </tr>
                <tr class="dark">
                    <td colspan="2" style="padding-left:30px;margin-left:30px;">
                        <font color="Red"><sup>*</sup> - fields required</font>
                        <br />
                    </td>
                </tr>
                <tr>
                    <td align="center" colspan="2">
                        <input type="submit" value="Apply" class="button" />
                        &nbsp;&nbsp;&nbsp;
                        <input type="button" value="Cancel" class="button" onClick="javascript : window.location.href = '{geturl plugin=clientsclass method='null'}{$str_get}'" />
                        <br />
                    </td>
                </tr>
                </table>
    <br />
    <br />
    <br />
    <br />

<!-- ************************* Shipping details information **************************************** -->

                <table width="70%" cellpadding="1" cellspacing="1" border="0" id="content_text">
                <tr class="subtitle">
                    <td colspan="2">Shipping details information<br /><span style="font-weight:normal"><i>Your shipping address</i></span></td>
                </tr>
                <tr class="light">
                    <td align="right" width="20%">Name:&nbsp;</td>
                    <td><input type="text" name="client_shipping_name" value="{$info_client.client_shipping_name}" class='inputtext' style="width:95%"></td>
                </tr>
                <tr class="light">
                    <td align="right">Address1:&nbsp;</td>
                    <td><input type="text" name="client_shipping_adress1" value="{$info_client.client_shipping_adress1}" class='inputtext' style='width: 95%'></td>
                </tr>
                <tr class="light">
                    <td align="right">Address2:&nbsp;</td>
                    <td><input type="text" name="client_shipping_adress2" value="{$info_client.client_shipping_adress2}" class='inputtext' style='width: 95%'></td>
                </tr>
                <tr class="light">
                    <td align="right">City:&nbsp;</td>
                    <td><input type="text" name="client_shipping_city" value="{$info_client.client_shipping_city}" class='inputtext' style='width: 95%'></td>
                </tr>
                <tr class="light">
                    <td align="right">State:&nbsp;</td>
                    <td><input type="text" name="client_shipping_state" value="{$info_client.client_shipping_state}" class="inputtext" style="width:95%"></td>
                </tr>
                <tr class="light">
                    <td align="right">Zip:&nbsp;</td>
                    <td><input type="text" name="client_shipping_zip" value="{$info_client.client_shipping_zip}" class='inputtext' style='width: 95%'></td>
                </tr>
                <tr class="light">
                    <td align="right">Country:&nbsp;</td>
                    <td><SELECT id="client_shipping_country" style="width:95%" name="client_shipping_country" class="inputtext"></SELECT></td>
                </tr>
                <tr class="dark">
                    <td colspan="2" style="padding-left:30px;margin-left:30px;">
                        <font color="Red"><sup>*</sup> - fields required</font>
                        <br />
                    </td>
                </tr>
                <tr>
                    <td align="center" colspan="2">
                        <input type="submit" value="Apply" class="button" />
                        &nbsp;&nbsp;&nbsp;
                        <input type="button" value="Cancel" class="button" onClick="javascript : window.location.href = '{geturl plugin=clientsclass method='null'}{$str_get}'" />
                        <br />
                    </td>
                </tr>
                </table>
    <br />
    <br />
    <br />
    <br />
<!--   ****************************************** Credit Card Information ***********************************************************************   -->                            

        <table width="70%" cellpadding="2" cellspacing="2" border="0" id="content_text" class="list">
            <tr class="subtitle">
                <td colspan="2" align="left">Credit Card Information</td>
            </tr>
            <tr class="dark"><td align="right" valign="top">Credit card:&nbsp;</td>
            
                <td>
                <table cellpadding="0" cellspacing="0" border="0">
                <tr>
                    <td><img src="../img/cards/visa.png" border="0"></td>
                    <td><img src="../img/cards/mastercard.png" border="0"></td>
                    <td><img src="../img/cards/discover.png" border="0"></td>
                    <td><img src="../img/cards/americanexpress.png" border="0"></td>
                </tr>
                <tr>
        
                    <td align="center"><input type="radio" name="client_cctype" value="VISA"{if "VISA" == $info_client.client_cctype} checked{/if}></td>
                    <td align="center"><input type="radio" name="client_cctype" value="MasterCard"{if "MasterCard" == $info_client.client_cctype} checked{/if}></td>
                    <td align="center"><input type="radio" name="client_cctype" value="Discover"{if "Discover" == $info_client.client_cctype} checked{/if}></td>
                    <td align="center"><input type="radio" name="client_cctype" value="American Express"{if "American Express" == $info_client.client_cctype} checked{/if}></td>
                </tr>
                </table>
                </td>
            </tr>
            <tr class="light">
                <td align="right">Credit Card Number:<sup><font color=red>*</font></sup>&nbsp;</td>
                <td><input type="text" name="client_ccnumber" value="{$info_client.client_ccnumber}" class='inputtext' style='width: 95%'></td>
            </tr>
            <tr class="light">
                <td align="right">CVV<sup><font color=red>*</font></sup>:&nbsp;</td>
                <td><input type="text" name="client_cccvv" value="{$info_client.client_cccvv}" class='inputtext' style='width: 95%'></td>
            </tr>
            <tr class="light">
                <td align="right">Credit Card Owner:<sup><font color=red>*</font></sup>&nbsp;</td>
                <td><input type="text" name="client_ccholdername" value="{$info_client.client_ccholdername}" class='inputtext' style='width: 95%'></td>
            </tr>
            <tr class="light">
                <td align="right">Expiration Date:&nbsp;</td>
                <td><input type="text" id="cExpDate" name="client_ccexpdate" value="{$info_client.client_ccexpdate|date_format:"%m/%d/%Y"}" maxlength="25" size="25" style="width:115px;" />
                    <a href="javascript:NewCal('cExpDate','mmddyyyy',false,24)"><img src="/img/cal.gif" width="16" height="16" border="0" alt="Pick a date"></a>
                </td>
            </tr>
            <tr class="dark">
                <td colspan="2" style="padding-left:30px;margin-left:30px;">
                    <font color="Red"><sup>*</sup> - fields required</font>
                    <br />
                </td>
            </tr>
            <tr>
                <td align="center" colspan="2">
                    <input type="submit" value="Apply" class="button" />
                    &nbsp;&nbsp;&nbsp;
                    <input type="button" value="Cancel" class="button" onClick="javascript : window.location.href = '{geturl plugin=clientsclass method='null'}{$str_get}'" />
                    <br />
                </td>
            </tr>
        </table>

<!-- ************************************************************************************************************************* -->
</form>
                    <SCRIPT>
                        FillCountry(document.form_check_out.client_billing_country, document.form_check_out.client_billing_state, '{$info_client.client_billing_country}');
                        FillState(document.form_check_out.client_billing_country, document.form_check_out.client_billing_state, '{$info_client.client_billing_state}');
                        FillCountry(document.form_check_out.client_shipping_country, document.form_check_out.client_shipping_country, '{$info_client.client_shipping_country}');
                    </SCRIPT>